package com.twu.biblioteca;

/**
 * Created with IntelliJ IDEA.
 * User: PREETHI
 * Date: 14/5/13
 * Time: 11:18 PM
 * To change this template use File | Settings | File Templates.
 */
import java.util.*;

public class library {
         private List <category> categoryList;
         private List <book>bookList;
         private List <movie> movieList;
         private String username=null;
         public library()
         {
              setCategoryList(new ArrayList<category>());
             setMovieList(new ArrayList<movie>());

         }
         public void addBooks()
         {
             category c=new category("Programming",1);
             setBookList(new ArrayList());
             book b=new book("Programming Pearls",101,"Jon Bentley",10,"Programming");
             getBookList().add(b);
             b=new book("Head First Java",102,"Kathy Sierra",0,"Programming");
             getBookList().add(b) ;
             b=new book("JavaScript:The good parts",103,"Douglas Crockford",5,"Programming");
             getBookList().add(b) ;
             b=new book("Code Complete",104,"Steve McConnell",5,"Programming");
             getBookList().add(b) ;
             b=new book("Refactoring: Improving the Design of Existing Code ",105,"Martin Fowler",5,"Programming");
             getBookList().add(b) ;
             c.setBookList(getBookList());
             getCategoryList().add(c);

             c=new category("Fiction",2);
             setBookList(new ArrayList());
             b=new book("Misery",201,"Stephen King",0,"Fiction");
             getBookList().add(b);
             b=new book("The Shining",202,"Stephen King",6,"Fiction");
             getBookList().add(b);
             b=new book("The Thirteenth Tale ",203,"Diane Setterfield",6,"Fiction");
             getBookList().add(b);
             b=new book("Wonder Boys ",204,"Michael Chabon ",6,"Fiction");
             getBookList().add(b);
             c.setBookList(getBookList());
             getCategoryList().add(c);

             c=new category("Religion",3);
             setBookList(new ArrayList());
             b=new book("The God Delusion",301,"Richard Dawkins",4,"Religion");
             getBookList().add(b);
             b=new book("The Da Vinci Code",302,"Dan Brown",6,"Religion");
             getBookList().add(b);
             b=new book("Angels and Demons",303,"Dan Brown",6,"Religion");
             getBookList().add(b);
             b=new book("The Miracle of Forgiveness",304,"Spencer W. Kimball",6,"Religion");
             getBookList().add(b);
             b=new book("The Tao of Pooh",305,"Benjamin Hoff",6,"Religion");
             getBookList().add(b);

             c.setBookList(getBookList());
             getCategoryList().add(c);

         }

         public void addMovies()
         {
                movie m=new movie("The Shawshank Redemption",1994,"Frank Darabont","9",7);
                getMovieList().add(m);
                m=new movie("Argo",2012,"Ben Affleck","N/A",8);
                getMovieList().add(m);
                m=new movie("The Hunger Games",2012,"Gary Ross","N/A",0);
                getMovieList().add(m);
                m=new movie("Deja vu",2006,"Tony Scott","7",8);
                getMovieList().add(m);
                 m=new movie("Minority Report",2002,"Steven Speilberg","7.2",0);
                getMovieList().add(m);
                m=new movie("Sherlock Holmes",2009,"Guy Ritchie","7.6",2);
                getMovieList().add(m);
                m=new movie("A game of Shadows",2011,"Guy Ritchie","7.4",1);
               getMovieList().add(m);
                m=new movie("The Prestige",2006,"Christopher Nolan","8",3);
               getMovieList().add(m);
                m=new movie("Inkheart",2008,"Iain Softley","7",1);
               getMovieList().add(m);
               m=new movie("Unstoppable",2010,"Tony Scott","N/A",2);
              getMovieList().add(m);
              m=new movie("Rocket Singh",2009,"Shimit Amin","7",2);
               getMovieList().add(m);
               m=new movie("Lagaan",2001,"Ashutosh Gowariker","8.1",8);
               getMovieList().add(m);
               m=new movie("3 Idiots",2009,"Rajkumar Hirani","8.3",1);
               getMovieList().add(m);
              m=new movie("Taare Zameeen Par",2007,"Aamir Khan","8",1);
              getMovieList().add(m);
              m=new movie("Chak De!India",2007,"Shimit Amin", "N/A",8);
              getMovieList().add(m);



         }


    public List<category> getCategoryList() {
        return categoryList;
    }

    public void setCategoryList(List<category> categoryList) {
        this.categoryList = categoryList;
    }

    public List getBookList() {
        return bookList;
    }

    public void setBookList(List bookList) {
        this.bookList = bookList;
    }

    public List<movie> getMovieList() {
        return movieList;
    }

    public void setMovieList(List<movie> movieList) {
        this.movieList = movieList;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }
}